Machine learning is a branch of artificial intelligence that concerns the construction and study of systems that can learn from data. Many machine learning problems involve inferring a function from random labeled examples. For example, a machine learning system could be trained on email messages to learn to distinguish between spam and non-spam messages. After learning, it can then be used to classify new email messages into spam and non-spam folders. A focus of machine learning pertains to the concepts of representation and generalization. Representation of data instances and functions evaluated on these instances are part of all machine learning systems. Generalization is the property that the system will perform well on unknown data instances; the conditions under which this can be guaranteed are a key object of study in the subfield of computational learning theory. There are a wide variety of machine learning tasks and applications. For example, optical character recognition, in which printed characters are recognized automatically based on previous examples, is a classic example of machine learning.